jQuery(function($){ 
$("#InspirationSubcategoryId").chained("#InspirationCategoryId");
$('textarea#InspirationText').focus(function() {
   $(this).val('');
});


	$("<input type=\"button\"value=\"Suggest!\"/>").click(function(){ 

		$(this).parents("form:first").ajaxSubmit({ 

			success: function(responseText, responseCode) { 

					 $("#ajax-save-message").hide().html(responseText).fadeIn(); 

					 setTimeout(function(){ 

						 $("#ajax-save-message").fadeOut(); 

					 }, 5000); 
					 $('#CategorysuggestionAddForm').each (function(){
						 this.reset();
					 })

				 } 

		}); 

		return false; 

	}) 

	.appendTo("#CategorysuggestionAddForm"); 

});
